{extend name="index_layout"/}
{block name="main"}
<div class="layui-card">
    <div class="layui-card-header">店铺列管理</div>
    <div class="layui-card-body">
        <div class="layui-form">
            <table class="layui-hide" id="currentTable" lay-filter="currentTable"
                data-auth-add="{:$auth->check('cate/add')}" 
                data-auth-edit="{:$auth->check('cate/edit')}"
                data-auth-delete="{:$auth->check('cate/del')}"
                data-auth-recyclebin="{:$auth->check('cate/recyclebin')}"
                ></table>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
layui.use('yznTable', function() {
    var table = layui.yznTable;

    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTable',
        add_url: '{:url("add")}',
        edit_url: '{:url("edit")}',
        delete_url: '{:url("del")}',
        modify_url: "{:url('multi')}",
        recyclebin_url: "{:url('recyclebin')}",
    };

    table.render({
        init: init,
        toolbar: ['refresh', 'add', 'delete'],
        url: '{:url("index")}',
        cols: [
            [
               {type: 'checkbox', fixed: 'left' },
               {field: 'id', title: 'id',minWidth:80},
               {field: 'name', title: '店铺名称',minWidth:80, searchOp: 'LIKE',minWidth:110},
               {field: 'create_time', title: '创建时间',minWidth:80,width:180, search: 'range', templet: yznTable.formatter.datetime},
               {fixed: 'right',width:90,field: 'operate', search:false, title: '操作',templet: yznTable.formatter.tool,operat: ['edit','delete']}
            ]
        ],
        page: {}
    });

    yznTable.bindevent();
});
</script>
{/block}